// 类型断言
var str = 'hello world'

// var len = str.length
// var len = (str as string).length
var len = (<string>str).length

console.log(len)